﻿@using System.Globalization

<div class="container">

    <h1 class="display-4">@DateTime.Now.ToString("MMMM dd, yyyy dddd",CultureInfo.CreateSpecificCulture("en-GB"))</h1>
    <br />
    <p>Access from <code>@Context.Connection.RemoteIpAddress.ToString()</code><span class="badge badge-secondary ml-2" id="spanStatus">Idle</span></p>

    <div class="row">

        <div class="col-md-6 mt-4">
            <div class="card mb-2 tests-card h-100">
                <div class="card-body">
                    <h5 class="card-title">HTTP Lag</h5>
                    <p class="test-status"><pre id="httpStatus"></pre></p>
                    <p class="test-status"><code id="httpMax"></code></p>
                    <canvas id="httpChart"></canvas>
                </div>
            </div>
        </div>

        <div class="col-md-6 mt-4">
            <div class="card mb-2 tests-card h-100">
                <div class="card-body">
                    <h5 class="card-title">Download Speed</h5>
                    <p class="test-status"><pre id="downStatus"></pre></p>
                    <p class="test-status"><code id="downMax"></code></p>
                    <canvas id="downloadChart"></canvas>
                </div>
            </div>
        </div>

        <div class="col-md-6 mt-4">
            <div class="card mb-2 tests-card h-100">
                <div class="card-body">
                    <h5 class="card-title">WebSocket Lag</h5>
                    <p class="test-status"><pre id="wsStatus"></pre></p>
                    <p class="test-status"><code id="wsmax"></code></p>
                    <canvas id="wsChart"></canvas>
                </div>
            </div>
        </div>
    </div>

    <script src="~/lib/chart.js/dist/chart.umd.min.js"></script>

    <script src="~/js/overview/down.min.js"></script>
    <script src="~/js/overview/http.min.js"></script>
    <script src="~/js/overview/ws.min.js"></script>
    <script src="~/js/overview/site.min.js"></script>

    <script>
        window.onload = setTimeout(startAll, 1000);
    </script>
</div>